﻿using FollowMe.Services;
using FollowMe.Services.Request;
using Microsoft.Practices.Unity;
using System.Web.Http;

/**
 * FollowMe Server
 * UWRF CS425 & CS343 Project Fall 2014
 * Adam Drews
 *   email adam.drews@my.uwrf.edu
 * Tyler Johnson
 *   email tyler.johnson@my.uwrf.edu
 * Nicholas Thorp
 *   email nicholas.thorp@my.uwrf.edu
 */
namespace FollowMe.API.Controllers
{
    /// <summary>
    /// Location Related API functions
    /// </summary>
    public class LocationController : ApiController
    {
        /// <summary>
        /// The follow me services
        /// </summary>
        private IFollowMeService _services;

        /// <summary>
        /// Initializes a new instance of the <see cref="LocationController"/> class.
        /// </summary>
        public LocationController()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="LocationController"/> class.
        /// </summary>
        /// <param name="services">The follow me services.</param>
        [InjectionConstructor]
        public LocationController(FollowMeService services)
        {
            _services = services;
        }

        //PUT api/Location/NoShare
        /// <summary>
        /// Disable location sharing
        /// </summary>
        /// <param name="member">The member.</param>
        /// <returns>Not Implimented</returns>
        [Route("NoShareLocation", Name = "NoShareLocation")]
        [System.Web.Http.AcceptVerbs("PUT")]
        [System.Web.Http.HttpPut]
        [AllowAnonymous]
        public IHttpActionResult NoShare(FindMemberInfoRequest member)
        {
            if (member == null) { return BadRequest("null"); }

            return Ok();
            //return Ok(_services.NoShareLocation);
        }
    }
}